//
//  FQDAccountManager.h
//  FakeQDaily
//
//  Created by mewxiv on 9/7/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "QDailyAPI.h"
@class FQDUser;
@class FQDRadarItem;

@interface FQDAccountManager : NSObject

// 当前用户信息，只读
@property (nonatomic, readonly, strong) FQDUser *currentUser;
// 当前用户id，未登录返回0
@property (nonatomic, readonly, copy) NSString *currentUserId;
// 雷达信息
@property (nonatomic, strong) NSArray<FQDRadarItem *> *radarItems;

+ (instancetype)sharedManager;
// 自动登录
- (void)autoLogin;
// 手机号码登录
- (void)loginWithPhone:(NSString *)phone password:(NSString *)password remember:(BOOL)remember completion:(void (^)(BOOL success))completion;
// email账号登录
- (void)loginWithEmail:(NSString *)email password:(NSString *)password remember:(BOOL)remember completion:(void (^)(BOOL success))completion;
// 退出登录
- (void)logout:(void (^)(BOOL success))completion;
// 修改当前登录账号
- (void)changeCurrentUser:(FQDUser *)user;
// 是否登录
- (BOOL)isLogined;

@end
